/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sys.screen;

import java.io.IOException;
import java.net.InetAddress;
import java.sql.SQLException;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import org.ini4j.Ini;
import org.ini4j.Wini;
import sys.bean.ClienteBean;
import sys.bean.EmpresaBean;
import sys.bean.PedidoBean;
import sys.bean.ProdutoBean;
import sys.bean.ProdutoRomaneioBean;
import sys.bean.RomaneioBean;
import sys.bean.StatusBean;
import sys.dao.CidadeDao;
import sys.dao.ClienteDao;
import sys.dao.EmpresaDao;
import sys.dao.EstadoDao;
import sys.dao.MotoristaDao;
import sys.dao.ProdutoPedidoDao;
import sys.dao.ProdutoRomaneioDao;
import sys.dao.RomaneioDao;
import sys.dao.StatusDao;
import sys.dao.StatusRomaneioDao;
import sys.dao.VeiculoDao;
import sys.utils.LetterUpper;
import sys.utils.Mensagens;
import sys.utils.Singleton;

/**
 *
 * @author Administrador
 */
public class CRetornoPedido extends javax.swing.JDialog {

    private CPedidosParaEntrega paiPedidosParaEntrega;

    NumberFormat formatoMoeda = NumberFormat.getCurrencyInstance();
    SimpleDateFormat formDataBr = new SimpleDateFormat("dd/MM/yyyy");

    EmpresaBean empresa;
    RomaneioBean romaneio;

    private List<StatusBean> listaStatus;
    private List<ProdutoRomaneioBean> listaProdutosEnviados = new ArrayList<>();
    private List<ProdutoRomaneioBean> listaProdutosEntregues = new ArrayList<>();

    StatusDao daoStatus = new StatusDao();
    EmpresaDao daoEmpresa = new EmpresaDao();
    RomaneioDao daoRomaneio = new RomaneioDao();
    ProdutoRomaneioDao daoProdutoRomaneio = new ProdutoRomaneioDao();

    public CRetornoPedido(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        paiPedidosParaEntrega = (CPedidosParaEntrega) parent;
        initComponents();
        setLocationRelativeTo(null);
        carregaDadosMaquinaLocal();
    }

    public String formatoMoeda(double valor) {
        return formatoMoeda.format(valor).replace("R$", "");
    }

    public void preencheCampos(int idRomaneio) {
        try {

            romaneio = daoRomaneio.getRomaneio(idRomaneio);

            txNRomaneio.setText(romaneio.getIdRomaneio() + "");
            txDataRomaneio.setText(formDataBr.format(romaneio.getDataRomaneio()));
            txCodigoCliente.setText(romaneio.getCliente().getCodigo());
            txNomeCliente.setText(romaneio.getCliente().getNome());
            dataEntregaAgendada.setText(formDataBr.format(romaneio.getDataEntregaAgendada()));
            txHoraAgendado.setText(romaneio.getHoraAgendada());
            txEndereco.setText(romaneio.getEnderecoEntrega());
            txNEndereco.setText(romaneio.getnEnderecoEntrega());
            txBairro.setText(romaneio.getBairroEntrega());

            carregaStatus();
            carregaProdutosRomaneio(idRomaneio);

        } catch (SQLException ex) {
            Mensagens.msgErro("erro ao carregar romaneio\n" + ex.getMessage());
        }
    }

    private RomaneioBean retObjetoRomaneio() {

        RomaneioBean r = new RomaneioBean();

        r.setIdRomaneio(Integer.parseInt(this.txNRomaneio.getText()));
        r.setAplicacao(this.txAplicacao.getText());
        r.setInicioCarga(this.txInicioCarga.getText());
        r.setChegObra(this.txChegObra.getText());
        r.setInicioDescarga(this.txInicioDescarga.getText());
        r.setTermDescarga(this.txTermDescarga.getText());
        r.setSaidaObra(this.txSaidaObra.getText());
        r.setChegadaUsina(this.txChegUsina.getText());

        if (this.txTotalAgua.getText().equals("")) {
            r.setTotalAgua(0.0D);
        } else {
            r.setTotalAgua(Double.parseDouble(this.txTotalAgua.getText()));
        }
        if (this.txAguaNaObra.getText().equals("")) {
            r.setAguaObra(0.0D);
        } else {
            r.setAguaObra(Double.parseDouble(this.txAguaNaObra.getText()));
        }

        r.setSlumpRetornado(Integer.parseInt(this.txSlumpUtilizado.getText()));
        r.setDataMoldagem(this.dataMoldagem.getDate());
        r.setHoraMoldagem(this.txHoraMoldagem.getText());

        return r;

    }

    private void addQtdItemEntregue() {

        ProdutoRomaneioBean produtoRomaneio = new ProdutoRomaneioBean();
        PedidoBean pedido = new PedidoBean();
        ProdutoBean produto = new ProdutoBean();
        RomaneioBean r = new RomaneioBean();

        produto.setCodigo(Integer.parseInt(listaProdutosEnviados.get(tabelaEnviados.getSelectedRow()).getProduto().getCodigo()) + "");
        System.out.println("Codigo " + Integer.parseInt(listaProdutosEnviados.get(tabelaEnviados.getSelectedRow()).getProduto().getCodigo()) + "");
        produto.setDescricao(listaProdutosEnviados.get(tabelaEnviados.getSelectedRow()).getProduto().getDescricao());
        produtoRomaneio.setProduto(produto);
        pedido.setPedido(Integer.parseInt(listaProdutosEnviados.get(tabelaEnviados.getSelectedRow()).getRomaneio().getPedido().getPedido()) + "");
        System.out.println("pedido " + Integer.parseInt(listaProdutosEnviados.get(tabelaEnviados.getSelectedRow()).getRomaneio().getPedido().getPedido()) + "");
        r.setPedido(pedido);
        r.setIdRomaneio(Integer.parseInt(txNRomaneio.getText()));

        produtoRomaneio.setRomaneio(r);
        produtoRomaneio.setQtdEntregue(Double.parseDouble(txQtd.getText().replace(",", ".")));

        listaProdutosEntregues.add(produtoRomaneio);
    }

    private void atualizaTabelaItensEntregues() {

        DefaultTableModel modelo = (DefaultTableModel) tabelaEntregues.getModel();
        modelo.setNumRows(0);
        for (ProdutoRomaneioBean prodRomaneio : listaProdutosEntregues) {
            modelo.addRow(new Object[]{
                prodRomaneio.getRomaneio().getPedido().getPedido(), prodRomaneio.getProduto().getDescricao(), formatoMoeda(prodRomaneio.getQtdEntregue())
            });
        }
        DefaultTableCellRenderer centralizado = new DefaultTableCellRenderer();
        centralizado.setHorizontalAlignment(SwingConstants.CENTER);
        tabelaEntregues.getColumnModel().getColumn(0).setCellRenderer(centralizado);
        tabelaEntregues.getColumnModel().getColumn(2).setCellRenderer(centralizado);
    }

    private void carregaProdutosRomaneio(int idRomaneio) {
        DefaultTableModel modelo = (DefaultTableModel) tabelaEnviados.getModel();
        modelo.setNumRows(0);
        try {
            listaProdutosEnviados = daoProdutoRomaneio.produtosRomaneio(idRomaneio);
            for (ProdutoRomaneioBean prodRomaneio : listaProdutosEnviados) {
                modelo.addRow(new Object[]{
                    prodRomaneio.getRomaneio().getPedido().getPedido(), prodRomaneio.getProduto().getDescricao(), formatoMoeda(prodRomaneio.getQtdEnviada())
                });
            }
            DefaultTableCellRenderer centralizado = new DefaultTableCellRenderer();
            centralizado.setHorizontalAlignment(SwingConstants.CENTER);

            tabelaEnviados.getColumnModel().getColumn(0).setCellRenderer(centralizado);
            tabelaEnviados.getColumnModel().getColumn(2).setCellRenderer(centralizado);

        } catch (SQLException ex) {
            Mensagens.msgErro("erro ao carregar produtos do pedido\n" + ex.getMessage());
        }
    }

    private void carregaStatus() {
        try {
            listaStatus = daoStatus.listaStatus();
            cbStatusAtual.addItem(listaStatus.get(2).getIdStatus() + " - " + listaStatus.get(2).getDescricao());
            cbProximoStatus.addItem(listaStatus.get(3).getIdStatus() + " - " + listaStatus.get(3).getDescricao());
        } catch (SQLException ex) {
            Mensagens.msgErro("erro ao atualizar status\n" + ex.getMessage());
        }
    }

    public final void carregaDadosMaquinaLocal() {
        SimpleDateFormat formatoData = new SimpleDateFormat("EEEE-dd/MMMMM/yyyy");
        try {
            empresa = daoEmpresa.consultaEmpresa();
            lbData.setText(formatoData.format(new Date()));
            lbTerminal.setText(InetAddress.getLocalHost().getHostName() + " / " + InetAddress.getLocalHost().getHostAddress());
            lbUsuario.setText(Singleton.getCodigo() + "-" + Singleton.getNome() + " (" + Singleton.getTipo() + ")");
            lbEmpresa.setText(empresa.getRazaoSocial() + " - " + empresa.getCidade().getNome() + " (" + empresa.getCidade().getEstado().getUf() + ")");
        } catch (SQLException | IOException ex) {
            Mensagens.msgErro("erro ao carregar dados da maquina local\n" + ex.getMessage());
        }
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tabelaEnviados = new javax.swing.JTable();
        txQtd = new javax.swing.JTextField();
        btnAdd = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tabelaEntregues = new javax.swing.JTable();
        btnRemove = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        txNomeCliente = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        txEndereco = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        txNEndereco = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        txBairro = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        txHoraAgendado = new javax.swing.JFormattedTextField();
        jLabel15 = new javax.swing.JLabel();
        txCodigoCliente = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        dataEntregaAgendada = new javax.swing.JTextField();
        jPanel9 = new javax.swing.JPanel();
        btnSalvar = new javax.swing.JButton();
        btnSair1 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        txNRomaneio = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        txDataRomaneio = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        lbTerminal = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        lbUsuario = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        lbEmpresa = new javax.swing.JLabel();
        lbData = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        cbStatusAtual = new javax.swing.JComboBox();
        jLabel24 = new javax.swing.JLabel();
        cbProximoStatus = new javax.swing.JComboBox();
        jPanel7 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        txInicioCarga = new javax.swing.JFormattedTextField();
        jLabel21 = new javax.swing.JLabel();
        txAplicacao = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        txChegObra = new javax.swing.JFormattedTextField();
        jLabel28 = new javax.swing.JLabel();
        txInicioDescarga = new javax.swing.JFormattedTextField();
        txTermDescarga = new javax.swing.JFormattedTextField();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        txSaidaObra = new javax.swing.JFormattedTextField();
        txChegUsina = new javax.swing.JFormattedTextField();
        jLabel31 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        txTotalAgua = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        txAguaNaObra = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        txSlumpUtilizado = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        txHoraMoldagem = new javax.swing.JFormattedTextField();
        dataMoldagem = new com.toedter.calendar.JDateChooser("dd/MM/yyyy", "##/##/#####", '_');

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("RETORNO DO PEDIDO");

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ORDEM DE CARREGAMENTO:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel16.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel16.setText("PRODUTOS ENVIADOS:");

        tabelaEnviados.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        tabelaEnviados.setForeground(new java.awt.Color(51, 51, 255));
        tabelaEnviados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "PEDIDO", "PRODUTO", "QTD"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabelaEnviados.setGridColor(new java.awt.Color(204, 204, 204));
        tabelaEnviados.getTableHeader().setReorderingAllowed(false);
        tabelaEnviados.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                tabelaEnviadosMousePressed(evt);
            }
        });
        jScrollPane3.setViewportView(tabelaEnviados);
        if (tabelaEnviados.getColumnModel().getColumnCount() > 0) {
            tabelaEnviados.getColumnModel().getColumn(0).setPreferredWidth(20);
            tabelaEnviados.getColumnModel().getColumn(1).setPreferredWidth(200);
        }

        txQtd.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        txQtd.setForeground(new java.awt.Color(51, 51, 255));
        txQtd.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txQtd.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                txQtdMousePressed(evt);
            }
        });

        btnAdd.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        btnAdd.setText("+");
        btnAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel3.setText("PRODUTOS ENTREGUES:");

        tabelaEntregues.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        tabelaEntregues.setForeground(new java.awt.Color(0, 153, 51));
        tabelaEntregues.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "PEDIDO", "PRODUTO", "QTD"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabelaEntregues.setGridColor(new java.awt.Color(204, 204, 204));
        tabelaEntregues.getTableHeader().setReorderingAllowed(false);
        jScrollPane4.setViewportView(tabelaEntregues);
        if (tabelaEntregues.getColumnModel().getColumnCount() > 0) {
            tabelaEntregues.getColumnModel().getColumn(0).setPreferredWidth(20);
            tabelaEntregues.getColumnModel().getColumn(1).setPreferredWidth(200);
        }

        btnRemove.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        btnRemove.setText("-");
        btnRemove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRemoveActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnRemove, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txQtd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnAdd, javax.swing.GroupLayout.Alignment.TRAILING)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel16)
                .addGap(7, 7, 7)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(btnAdd)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txQtd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(btnRemove)
                        .addGap(0, 62, Short.MAX_VALUE)))
                .addContainerGap())
        );

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DADOS DA ENTREGA:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel2.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel2.setText("CÓDIGO:");

        txNomeCliente.setEditable(false);
        txNomeCliente.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txNomeCliente.setForeground(new java.awt.Color(51, 51, 255));

        jLabel7.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel7.setText("ENDEREÇO:");

        txEndereco.setDocument(new LetterUpper());
        txEndereco.setEditable(false);
        txEndereco.setBackground(new java.awt.Color(245, 245, 245));
        txEndereco.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txEndereco.setForeground(new java.awt.Color(51, 51, 255));

        jLabel12.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel12.setText("NÚMERO:");

        txNEndereco.setDocument(new LetterUpper());
        txNEndereco.setEditable(false);
        txNEndereco.setBackground(new java.awt.Color(245, 245, 245));
        txNEndereco.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txNEndereco.setForeground(new java.awt.Color(51, 51, 255));
        txNEndereco.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel13.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel13.setText("BAIRRO:");

        txBairro.setDocument(new LetterUpper());
        txBairro.setEditable(false);
        txBairro.setBackground(new java.awt.Color(245, 245, 245));
        txBairro.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txBairro.setForeground(new java.awt.Color(51, 51, 255));

        jLabel6.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel6.setText("DATA DA ENTREGA:");

        txHoraAgendado.setEditable(false);
        txHoraAgendado.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txHoraAgendado.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txHoraAgendado.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txHoraAgendado.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jLabel15.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel15.setText("HORA:");

        txNEndereco.setDocument(new LetterUpper());
        txCodigoCliente.setEditable(false);
        txCodigoCliente.setBackground(new java.awt.Color(245, 245, 245));
        txCodigoCliente.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txCodigoCliente.setForeground(new java.awt.Color(51, 51, 255));
        txCodigoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel8.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel8.setText("NOME:");

        txNEndereco.setDocument(new LetterUpper());
        dataEntregaAgendada.setEditable(false);
        dataEntregaAgendada.setBackground(new java.awt.Color(245, 245, 245));
        dataEntregaAgendada.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        dataEntregaAgendada.setForeground(new java.awt.Color(51, 51, 255));
        dataEntregaAgendada.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, 298, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))
                        .addGap(6, 6, 6)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txNEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel12))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel13))
                    .addComponent(txBairro, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txCodigoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel8)
                            .addComponent(txNomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6)
                            .addComponent(dataEntregaAgendada, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15)
                            .addComponent(txHoraAgendado, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel2)
                                .addComponent(jLabel8))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txNomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txCodigoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(dataEntregaAgendada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(28, 28, 28)))
                    .addComponent(txHoraAgendado, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txBairro, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txNEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel9.setBackground(new java.awt.Color(245, 245, 245));

        btnSalvar.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/salvar.png"))); // NOI18N
        btnSalvar.setText("SALVAR");
        btnSalvar.setPreferredSize(new java.awt.Dimension(120, 30));
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });
        jPanel9.add(btnSalvar);

        btnSair1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        btnSair1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/delete.png"))); // NOI18N
        btnSair1.setText("SAIR");
        btnSair1.setPreferredSize(new java.awt.Dimension(120, 30));
        btnSair1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair1ActionPerformed(evt);
            }
        });
        jPanel9.add(btnSair1);

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DADOS DO ROMANEIO:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel22.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel22.setText("ROMANEIO:");

        txNRomaneio.setEditable(false);
        txNRomaneio.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txNRomaneio.setForeground(new java.awt.Color(51, 51, 255));
        txNRomaneio.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel11.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel11.setText("DATA ROMANEIO:");

        txDataRomaneio.setEditable(false);
        txDataRomaneio.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txDataRomaneio.setForeground(new java.awt.Color(51, 51, 255));
        txDataRomaneio.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel22)
                    .addComponent(jLabel11)
                    .addComponent(txDataRomaneio, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                    .addComponent(txNRomaneio))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jLabel22)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txNRomaneio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txDataRomaneio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel6.setBackground(new java.awt.Color(255, 255, 255));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INFORMAÇÕES:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel17.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/terminal.png"))); // NOI18N

        lbTerminal.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        lbTerminal.setForeground(new java.awt.Color(51, 102, 255));

        jLabel18.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/user.png"))); // NOI18N

        lbUsuario.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        lbUsuario.setForeground(new java.awt.Color(51, 102, 255));

        jLabel19.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/empresa.png"))); // NOI18N

        lbEmpresa.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        lbEmpresa.setForeground(new java.awt.Color(51, 102, 255));

        lbData.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        lbData.setForeground(new java.awt.Color(51, 102, 255));
        lbData.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel17)
                                    .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lbTerminal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lbEmpresa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lbData, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(lbTerminal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(9, 9, 9)
                        .addComponent(lbUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(7, 7, 7)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbEmpresa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbData, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel5.setBackground(new java.awt.Color(255, 255, 255));
        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "STATUS DO ROMANEIO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel23.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel23.setText("STATUS ATUAL:");

        cbStatusAtual.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        cbStatusAtual.setForeground(new java.awt.Color(51, 51, 255));
        cbStatusAtual.setEnabled(false);

        jLabel24.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel24.setText("PRÓXIMO STATUS:");

        cbProximoStatus.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        cbProximoStatus.setForeground(new java.awt.Color(51, 51, 255));
        cbProximoStatus.setEnabled(false);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbStatusAtual, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cbProximoStatus, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jLabel23)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cbStatusAtual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel24)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cbProximoStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel7.setBackground(new java.awt.Color(255, 255, 255));
        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DADOS DA ENTREGA:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel4.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel4.setText("APLICAÇÃO:");

        txInicioCarga.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txInicioCarga.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txInicioCarga.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txInicioCarga.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jLabel21.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel21.setText("INIC. CARGA");

        txAplicacao.setDocument(new LetterUpper());
        txAplicacao.setBackground(new java.awt.Color(245, 245, 245));
        txAplicacao.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txAplicacao.setForeground(new java.awt.Color(51, 51, 255));

        jLabel27.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel27.setText("CHEG. OBRA");

        txChegObra.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txChegObra.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txChegObra.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txChegObra.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jLabel28.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel28.setText("INI. DESCAR.");

        txInicioDescarga.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txInicioDescarga.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txInicioDescarga.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txInicioDescarga.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        txTermDescarga.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txTermDescarga.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txTermDescarga.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txTermDescarga.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jLabel29.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel29.setText("TER. DESCAR.");

        jLabel30.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel30.setText("SAIDA OBRA");

        txSaidaObra.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txSaidaObra.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txSaidaObra.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txSaidaObra.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        txChegUsina.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txChegUsina.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txChegUsina.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txChegUsina.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jLabel31.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel31.setText("CHEG. USINA");

        jLabel5.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel5.setText("TOTAL DE AGUA:");

        txNEndereco.setDocument(new LetterUpper());
        txTotalAgua.setBackground(new java.awt.Color(245, 245, 245));
        txTotalAgua.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txTotalAgua.setForeground(new java.awt.Color(51, 51, 255));
        txTotalAgua.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel9.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel9.setText("AGUA NA OBRA:");

        txNEndereco.setDocument(new LetterUpper());
        txAguaNaObra.setBackground(new java.awt.Color(245, 245, 245));
        txAguaNaObra.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txAguaNaObra.setForeground(new java.awt.Color(51, 51, 255));
        txAguaNaObra.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel10.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel10.setText("SLUMP UTILIZADO:");

        txNEndereco.setDocument(new LetterUpper());
        txSlumpUtilizado.setBackground(new java.awt.Color(245, 245, 245));
        txSlumpUtilizado.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txSlumpUtilizado.setForeground(new java.awt.Color(51, 51, 255));
        txSlumpUtilizado.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel14.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel14.setText("DATA MOLDAGEM:");

        jLabel32.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel32.setText("HORA:");

        txHoraMoldagem.setForeground(new java.awt.Color(51, 51, 255));
        try {
            txHoraMoldagem.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txHoraMoldagem.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txHoraMoldagem.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        dataMoldagem.setForeground(new java.awt.Color(51, 51, 255));
        dataMoldagem.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(txAplicacao, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel21)
                            .addComponent(txInicioCarga, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txChegObra)
                            .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel28)
                            .addComponent(txInicioDescarga, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txTermDescarga)
                            .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel30)
                            .addComponent(txSaidaObra, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txChegUsina)
                            .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(txTotalAgua, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9)
                            .addComponent(txAguaNaObra, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10)
                            .addComponent(txSlumpUtilizado, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(dataMoldagem, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                            .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel32)
                            .addComponent(txHoraMoldagem, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(34, 34, 34))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txChegObra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel7Layout.createSequentialGroup()
                            .addComponent(jLabel4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txAplicacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel27))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txInicioCarga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txTermDescarga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel29))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txInicioDescarga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(txChegUsina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel31))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txSaidaObra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txTotalAgua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txAguaNaObra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txSlumpUtilizado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel14))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txHoraMoldagem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(dataMoldagem, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                            .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 529, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed

        try {
            daoRomaneio.retornoRomaneio(retObjetoRomaneio());
            daoProdutoRomaneio.atualizaItensEntregues(listaProdutosEntregues);
            daoProdutoRomaneio.atualizaSaldoCliente(listaProdutosEntregues);
        } catch (SQLException ex) {
            ex.printStackTrace();
        }


    }//GEN-LAST:event_btnSalvarActionPerformed

    private void btnSair1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair1ActionPerformed
        if (Mensagens.confirmar(this, "deseja realmente sair")) {
            this.dispose();
        }
    }//GEN-LAST:event_btnSair1ActionPerformed

    private void tabelaEnviadosMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelaEnviadosMousePressed
        txQtd.setText(tabelaEnviados.getValueAt(tabelaEnviados.getSelectedRow(), 2) + "");
    }//GEN-LAST:event_tabelaEnviadosMousePressed

    private void txQtdMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txQtdMousePressed
        txQtd.selectAll();
    }//GEN-LAST:event_txQtdMousePressed

    private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
//        if (validaAddProdutoRomaneio()) {
        addQtdItemEntregue();
        atualizaTabelaItensEntregues();
//        }
    }//GEN-LAST:event_btnAddActionPerformed

    private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed
//        removeProdutoParaEntrega();
//        atualizaProdutosParaEntrega();
    }//GEN-LAST:event_btnRemoveActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdd;
    private javax.swing.JButton btnRemove;
    private javax.swing.JButton btnSair1;
    private javax.swing.JButton btnSalvar;
    private javax.swing.JComboBox cbProximoStatus;
    private javax.swing.JComboBox cbStatusAtual;
    private javax.swing.JTextField dataEntregaAgendada;
    private com.toedter.calendar.JDateChooser dataMoldagem;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JLabel lbData;
    private javax.swing.JLabel lbEmpresa;
    private javax.swing.JLabel lbTerminal;
    private javax.swing.JLabel lbUsuario;
    private javax.swing.JTable tabelaEntregues;
    private javax.swing.JTable tabelaEnviados;
    private javax.swing.JTextField txAguaNaObra;
    private javax.swing.JTextField txAplicacao;
    private javax.swing.JTextField txBairro;
    private javax.swing.JFormattedTextField txChegObra;
    private javax.swing.JFormattedTextField txChegUsina;
    private javax.swing.JTextField txCodigoCliente;
    private javax.swing.JTextField txDataRomaneio;
    private javax.swing.JTextField txEndereco;
    private javax.swing.JFormattedTextField txHoraAgendado;
    private javax.swing.JFormattedTextField txHoraMoldagem;
    private javax.swing.JFormattedTextField txInicioCarga;
    private javax.swing.JFormattedTextField txInicioDescarga;
    private javax.swing.JTextField txNEndereco;
    private javax.swing.JTextField txNRomaneio;
    private javax.swing.JTextField txNomeCliente;
    private javax.swing.JTextField txQtd;
    private javax.swing.JFormattedTextField txSaidaObra;
    private javax.swing.JTextField txSlumpUtilizado;
    private javax.swing.JFormattedTextField txTermDescarga;
    private javax.swing.JTextField txTotalAgua;
    // End of variables declaration//GEN-END:variables

}
